#include "stdafx.h"
#include "DefaultMat.h"
#include "matEditor.h"
const Ogre::String MatName = "DefaultMat";
static CDefaultMatFactory gCDefaultMatFactory;
DefaultMat::DefaultMat(Ogre::SubEntity * ent,matEditor * pMat) :BaseMat(ent,pMat)
{
	  m_DisMatName = ent->getMaterialName();
	m_MatName = ent->getMaterialName();
	m_MaterialPtr = ent->getMaterial();
	connect();
}

DefaultMat::~DefaultMat(void)
{
}

CBaseMatFactory *  DefaultMat::getFactory()
{
	return &gCDefaultMatFactory;
}

const Ogre::String DefaultMat::getName()
{
	return MatName;
}

BaseMat *CDefaultMatFactory::CreateObject(Ogre::SubEntity * ent,matEditor * pMat)
{
	m_InstanceCount++;
	return (new DefaultMat(ent, pMat));
}
